package com.hengpeng.itfinbase.persist;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Enumerated;

import com.hengpeng.common.web.annotation.HtmlInput;
import com.hengpeng.common.web.annotation.HtmlInputType;
import com.hengpeng.itfinbase.idAssign.AbstractAssign18IdEntity;


/**
 * <pre>
 * 提款明细信息
 * </pre>
 * @author shanguogang
 * @version 1.0, 2015-8-12
 */
@Entity
public class Drawing extends AbstractAssign18IdEntity
{
	/**
	 * <pre>
	 * 提款处理状态
	 * ( SUBMITED("已提交银行") 这个状态,在支付宝自动提款中无作用)
	 * </pre>
	 * @author linriqing
	 * @version 1.0, 2010-7-19
	 */
	public static enum DrawingState
	{
		DEALING("处理中"), FAILED("提款失败"), REFUNDED("已退单"), SUBMITED("已提交银行"), SUCCESS("提款成功"), WAIT("等待处理"), WAITREFUND(
				"等待退单"), WAITCONFIRM("等待审核");

		private String text;

		DrawingState(String text)
		{
			this.text = text;
		}

		public String getText()
		{
			return text;
		}

		public void setText(String text)
		{
			this.text = text;
		}
	}

	private static final long serialVersionUID = -8123910548435570621L;

	@Column(length = 50)
	@HtmlInput(label = "收款账号", type = HtmlInputType.TEXT, index = 11, nullable = false)
	private String bankCardNo;

	@Column(length = 50)
	@HtmlInput(label = "收款银行", type = HtmlInputType.TEXT, index = 5, nullable = false)
	private String bankName;

	@Column(length = 30)
	@HtmlInput(label = "银行交易流水号 ", type = HtmlInputType.TEXT, index = 7, nullable = true)
	private String bankSequence;

	/**
	 * 用户id
	 */
	@Column(length = 200)
	@HtmlInput(label = "用户ID", type = HtmlInputType.TEXT, index = 2, nullable = true)
	private Long userId;

	@Column(length = 50)
	@HtmlInput(label = "用户名", type = HtmlInputType.TEXT, index = 1, nullable = false)
	private String userName;

	@Column(length = 100)
	@HtmlInput(label = "开户行分行名称", type = HtmlInputType.TEXT, index = 9, nullable = true)
	private String branch;

	@Column(length = 100)
	@HtmlInput(label = "开户行所在城市", type = HtmlInputType.TEXT, index = 8, nullable = true)
	private String city;

	@HtmlInput(label = "手续费(分) ", type = HtmlInputType.TEXT, index = 11, nullable = true)
	private Long chargeMoney;

	@Column(length = 500)
	@HtmlInput(label = "失败原因 ", type = HtmlInputType.TEXT, index = 12, nullable = true)
	private String failedMsg;

	@Column(length = 30)
	@HtmlInput(label = "证件号码", type = HtmlInputType.TEXT, index = 14, nullable = true)
	private String cardNumber;

	@HtmlInput(label = "最后处理时间", type = HtmlInputType.TEXT, index = 16, nullable = true)
	private Date lastTime;

	@HtmlInput(label = "提现金额(分)", type = HtmlInputType.TEXT, index = 12, nullable = false)
	private Long money;

	/**
	 * 预计到账时间
	 */
	private String planDate;

	@Column(length = 10)
	@HtmlInput(label = "提款服务商", type = HtmlInputType.TEXT, index = 3, nullable = false)
	private String providerId;

	@Column(length = 50)
	@HtmlInput(label = "开户行所在省份", type = HtmlInputType.TEXT, index = 7, nullable = true)
	private String province;

	@Column(length = 50)
	@HtmlInput(label = "真实姓名", type = HtmlInputType.TEXT, index = 4, nullable = false)
	private String realName;

	@Column(length = 30)
	@HtmlInput(label = "关联交易流水号 ", type = HtmlInputType.TEXT, index = 7, nullable = true)
	private String refrenceId;

	@HtmlInput(label = "请求时间", type = HtmlInputType.TEXT, index = 15, nullable = true)
	private Date requestTime;

	@Column(length = 20)
	@Enumerated(javax.persistence.EnumType.STRING)
	@HtmlInput(label = "处理结果", type = HtmlInputType.TEXT, index = 10, nullable = false, labelProperty = "text")
	private DrawingState state;

	@Column(length = 100)
	@HtmlInput(label = "开户行支行名称 ", type = HtmlInputType.TEXT, index = 10, nullable = true)
	private String subbranch;

	@HtmlInput(label = "交易订单号 ", type = HtmlInputType.TEXT, index = 7, nullable = true)
	private String ordId;

	public String getUserName()
	{
		return userName;
	}

	public void setUserName(String userName)
	{
		this.userName = userName;
	}

	public String getBankName()
	{
		return this.bankName;
	}

	public String getBankSequence()
	{
		return bankSequence;
	}

	public String getBranch()
	{
		return this.branch;
	}

	public String getCity()
	{
		return this.city;
	}

	public String getFailedMsg()
	{
		return this.failedMsg;
	}

	public Date getLastTime()
	{
		return lastTime;
	}

	public Long getMoney()
	{
		return this.money;
	}

	public String getPlanDate()
	{
		return planDate;
	}

	public String getProviderId()
	{
		return this.providerId;
	}

	public String getProvince()
	{
		return this.province;
	}

	public String getRealName()
	{
		return this.realName;
	}

	public String getRefrenceId()
	{
		return refrenceId;
	}

	public Date getRequestTime()
	{
		return this.requestTime;
	}

	public DrawingState getState()
	{
		return state;
	}

	public String getSubbranch()
	{
		return this.subbranch;
	}

	public void setBankName(String bankName)
	{
		this.bankName = bankName;
	}

	public void setBankSequence(String bankSequence)
	{
		this.bankSequence = bankSequence;
	}

	public void setBranch(String branch)
	{
		this.branch = branch;
	}

	public void setCity(String city)
	{
		this.city = city;
	}

	public void setFailedMsg(String failedMsg)
	{
		this.failedMsg = failedMsg;
	}

	public void setLastTime(Date lastTime)
	{
		this.lastTime = lastTime;
	}

	public void setMoney(Long money)
	{
		this.money = money;
	}

	public void setPlanDate(String planDate)
	{
		this.planDate = planDate;
	}

	public void setProviderId(String providerId)
	{
		this.providerId = providerId;
	}

	public void setProvince(String province)
	{
		this.province = province;
	}

	public void setRealName(String realName)
	{
		this.realName = realName;
	}

	public void setRefrenceId(String refrenceId)
	{
		this.refrenceId = refrenceId;
	}

	public void setRequestTime(Date requestTime)
	{
		this.requestTime = requestTime;
	}

	public void setState(DrawingState state)
	{
		this.state = state;
	}

	public void setSubbranch(String subbranch)
	{
		this.subbranch = subbranch;
	}

	public String getCardNumber()
	{
		return cardNumber;
	}

	public void setCardNumber(String cardNumber)
	{
		this.cardNumber = cardNumber;
	}

	public String getBankCardNo()
	{
		return bankCardNo;
	}

	public void setBankCardNo(String bankCardNo)
	{
		this.bankCardNo = bankCardNo;
	}

	public String getOrdId()
	{
		return ordId;
	}

	public void setOrdId(String ordId)
	{
		this.ordId = ordId;
	}

	public Long getUserId()
	{
		return userId;
	}

	public void setUserId(Long userId)
	{
		this.userId = userId;
	}

	public Long getChargeMoney()
	{
		return chargeMoney;
	}

	public void setChargeMoney(Long chargeMoney)
	{
		this.chargeMoney = chargeMoney;
	}

}